angular.module('${menuCode}')
.controller("${widgetCode}Ctrl",function($scope,AppKit){
	$scope.closeModal = function() {
		AppKit.closeModal();
	};
	
	$scope.loadCostListData = function() {
		var url='/aeaiem/services/DailyReiDataProvider/rest/daily-rei-Detail/'+$scope.detailId ;
		var promise = AppKit.getJsonApi(url);  
		promise.success(function(rspJson){
			$scope.costData = rspJson;
			
			$scope.costData.WFP_ID = $scope.WFP_ID;
			$scope.costData.WFA_CODE = $scope.WFA_CODE;
			$scope.costData.WFIP_ID = $scope.WFIP_ID;
			
		})
	}
	
	$scope.loadCostListData();
	
	$scope.submitAgainDetailInfo = function() {
		var url ='/aeaiem/services/TodoTaskDataProvider/rest//daily-todo-task-again';
		AppKit.postJsonApi(url,$scope.costData).then(function(rspJson){
			AppKit.successPopup({"title":"提交成功!"});
			$scope.loadToduTaskDate();
			AppKit.closeModal();
			AppKit.hideMask();
		}); 
	}
	
	$scope.cancelAgainDetailInfo = function() {
		var url ='/aeaiem/services/TodoTaskDataProvider/rest/daily-todo-task-cancel';
		AppKit.postJsonApi(url,$scope.costData).then(function(rspJson){
			AppKit.successPopup({"title":"废弃成功!"});
			$scope.loadToduTaskDate();
			AppKit.closeModal();
			
			AppKit.hideMask();
		}); 
	}
	
	
	 function DetailInfo(){ 
         this.theme = '';
         this.money = '';
         this.desc = '';
         this.style = '';
         this.styleSelect ="";
      }
	
	
});